//package OODAY04;
//public class Test {
//    public static void main(String[] args) {}}
//        //多态
////        Master master=new Master();
////        DOG dog = new DOG("白白",2,"白");
////        FISH fish = new FISH("黑黑",1,"黑");
////        CHICK chick=new CHICK("黄黄",1,"黄黄");
////        master.feed(dog);
////        master.feed(fish);
////        master.feed(chick);}
////
//
////        Animal []animals=new Animal[5];//创建Animal数组对象
////        animals[0]=new DOG("黄黄",1,"白");
////        animals[1]=new CHICK("白白",1,"黄");
////        animals[2]=new CHICK("小白",2,"黑");
////        animals[3]=new FISH("紫紫",4,"红");
////        animals[4]=new FISH("露露",3,"蓝");
//        for (int i=1;i<animals.length;i++){
//            System.out.println(animals[i].name+animals[i].age+animals[i].color);
//            animals[1].eat();
//            animals[2].drink();
//            if (animals[i]instanceof DOG){
//                DOG dog=(DOG)animals[i];
//                dog.lookhome();
//                dog.swim();
//            }
//            if (animals[i]instanceof CHICK){
//                CHICK chick=(CHICK) animals[i];
//                chick.layEggs();
//                chick.eat();
//            }
//            if (animals[i]instanceof FISH){
//                FISH fish=(FISH)animals[i];
//                fish.eat();
//                fish.swim();
//            }
//            if (animals[i]instanceof Swim){
//                Swim S=(Swim)animals[i];
//
//
//            }
//            }
//    }
//
//
//
//
////        DOG dag =new DOG("黄黄",25,"黄色");
////        dag.lookhome();
////        dag.eat();
////       dag.swim();
////        CHICK chick=new CHICK("灰灰",13,"白色");
////        chick.eat();
////        chick.layEggs();
////        FISH fish=new FISH("鸡鸡",1,"黑色");
////        fish.eat();
////        fish.swim();
////    }
////}
